import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/home/home'
import search from '@/search/search'
import vip from '@/vip/vip'
import shopcart from '@/shopcart/shopcart'
import newlist111 from '@/newlist/newlist111'
import newlist222 from '@/newlist/newlist222'
import newlist333 from '@/newlist/newlist333'
import newlist444 from '@/newlist/newlist444'
import vip1 from '@/vip/vip1'
Vue.use(Router)
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
    return originalPush.call(this, location).catch(err => err)
}



export default new Router({
    // mode: 'history',
    routes: [{
            path: '/',
            redirect: '/home'
        },
        {
            path: '/home',
            name: 'home',
            component: Home
        }, {
            path: '/search',
            name: 'search',
            component: search
        }, {
            path: '/vip',
            name: 'vip',
            component: vip
        }, {
            path: '/shopcart',
            name: 'shopcart',
            component: shopcart
        }, {
            path: '/newlist111',
            name: "newlist111",
            component: newlist111
        }, {
            path: '/newlist222',
            name: "newlist222",
            component: newlist222
        }, {
            path: '/newlist333',
            name: "newlist333",
            component: newlist333
        }, {
            path: '/newlist444',
            name: "newlist444",
            component: newlist444
        },
        {
            path: '/vip1',
            name: 'vip1',
            component: vip1
        }
    ]
})